package com.easyOrder.service.enums;

/**
 * Created by liutao on 2017/7/20.
 */
public enum RequisitionDetailState {
    order(1, "已下单"),
    pay(2, "已付款"),
    receiving(6, "已接单"),
    completed(3, "已完成"),
    customerCompleted(5, "已完成(客户)"),
    canceled(4, "已取消"),
    closed(99,"已过期"),
    ;

    private Integer value;

    private String desc;

    private RequisitionDetailState(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static RequisitionDetailState parse(Integer value) {
        if (null == value) {
            return null;
        }
        RequisitionDetailState[] coll = values();
        for (RequisitionDetailState item : coll) {
            if (item.getValue().equals(value)) {
                return item;
            }
        }
        return null;
    }
}
